import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if(j<i){
                    System.out.printf("%5s","");
                }else {

                    System.out.printf("%5d",j-i+1);
                }
            }
            System.out.println();
        }
    }
}